#!/bin/bash

# Remove old build directory if it exists
if [ -d "build" ]; then
    rm -rf build
fi

# Create and enter build directory
mkdir build && cd build

# Configure CMake based on platform
if [[ "$OSTYPE" == "msys" || "$OSTYPE" == "win32" ]]; then
    # Windows configuration
    cmake -A x64 ..
else
    # Unix-like systems (macOS, Linux)
    cmake ..
fi

# Build the project
cmake --build .

